﻿namespace DotNetUtility.Parser.Test
{
    using DotNetUtility.Parser;
    using NUnit.Framework;

    [TestFixture]
    public class EnumParserTest
    {
        public enum MyEnum
        {
            One = 0,
            Two
        }

        [Test]
        public void ParseStringValueToEnum()
        {
            string stringToParse = "One";
            MyEnum parsedEnum = EnumParser.ParseEnum<MyEnum>(stringToParse);
            MyEnum expectedEnum = MyEnum.One;
            Assert.AreEqual(parsedEnum, expectedEnum);
        }
    }
}
